home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / DELPHI / DIBS.ZIP / README.TXT < prev   
Encoding:
Text File  |  1996-08-23  |  3.7 KB  |  87 lines

  1. ********* CDIBs unit for Delphi 2.0 - Author: Lubomir Antonov
  2.  
  3. --------------- DESCRIPTION
  4.  
  5.     The CDIBs unit exports a class TDIB. The class provides easy access to device-
  6. independant bitmaps. TDIB parallels TBitmap in its interface and functionality, but
  7. TBitmap works with DDBs (device-dependant bitmaps). Therefore, if a DIB is ever assigned to
  8. a TBitmap object, it will be converted to the current screen resolution and assigned the
  9. currently realized palette (if it does not have one of its own).
  10.  
  11.     TDIB will allow you to manipulate DIBs (copying to and from the clipboard, files,
  12. the resource file and yes, even a TBitmap object). If you need to display the DIB, assign
  13. it to a TBitmap.
  14.  
  15. **** IMPORTANT for Windows NT:
  16.     The TDIB class also solves a problem (a bug I would say) in the TBitmap class -
  17. under Windows 95, if you have a CF_DIB format on the Clipboard and you assign the Clipboard
  18. to a TBitmap object, Windows 95 will automatically provide a CF_BITMAP and CF_PALETTE
  19. formats. But under Windows NT this conversion is not performed and the assignment will fail.
  20. (If you don't beleive me, have a look at the source code for the TBitmap class). By using
  21. a TDIB class, you can read the CF_DIB data and then assign the TDIB object to a TBitmap
  22. object.
  23.  
  24.  
  25. --------------- DISCLAIMER
  26.  
  27.     The CDIBs unit is provided as is and without warranties or guaranties of any kind.
  28. Any loss or damage resulting from the use of the software is not the responsibility of the
  29. author.
  30.  
  31.  
  32. --------------- DETAILS
  33.  
  34.     Initializing a TDIB:
  35.  
  36.         - Use the Assign method to assign the Clipboard, another TDIB or a TBitmap
  37.         to the TDIB object.
  38.  
  39.         - To load the DIB from a file or a resource call the methods LoadFromFile, 
  40.         LoadFromResourceName and LoadFromResourceID.
  41.  
  42.     Others:
  43.  
  44.         For most of the functionality of TDIB you can look at the decoumentation
  45.         for TBitmap - all of the TBitmap methods that make sence for DIBs are
  46.         implemented in TDIB. In addition there are some simple image processing
  47.         methods.
  48.  
  49.         - CopySection extracts a rectangular portion of the current DIB and assigns
  50.         it to the object.
  51.         - You can use the CanConvert16to24 and Convert16to24 to convert
  52.         16-bit to 24-bit bitmaps (I found the hard way that most image processing
  53.         applications can not read 16-bit bitmaps!).
  54.         - And finally, the DIBtoBitmap method creates a DDB and palette from the DIB.
  55.  
  56.         - TDIB objects can be assigned to the Clipboard, another TDIB or a TBitmap.
  57.         I suggest that if you need to preserve the DIB format, handle it using
  58.         a TDIB and use TBitmap.Assign( TDIB ) in order to display.
  59.  
  60.  
  61. --------------- SOURCE CODE & USAGE
  62.  
  63.     You can use the CDIBs unit without any restrictions with only one condition: send
  64. me an e-mail (or snail mail - see address below) saying that you are using the software.
  65. I would appreciate any comments you might have, too. No names necessary - I just want to
  66. how useful the TDIB class is.
  67.     My e-mail address is:
  68.  
  69.         lubomira@corel.com
  70.  
  71.     You can use the CDIBs unit without any restrictions. However, you might need to
  72. change some of the functionality of the TDIB class, or add to it. After all, I started TDIB
  73. because I needed to change functionality of TBitmap. Instead of reinventing the wheel, as I
  74. had to do, because of the very limiting implementation of TBitmap, you can have the source
  75. code for TDIB. For $5, though.
  76.     If you want the source code for the CDIBs unit, send a cheque or money order for
  77. $5 to:
  78.  
  79.     Lubomir Antonov
  80.     301 - 2201 Riverside Dr.
  81.     Ottawa, ON
  82.     K1H 8K9
  83.     Canada
  84.  
  85.     Please include a return e-mail address (for an e-mail attachment), a CompuServe
  86. address or mailing address (for a diskette). Or include a phone number to confirm an
  87. arrangement.